package com.boot23.mapper;

import com.boot23.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author wxd
 * @version 1.0
 */
@Mapper
public interface UserMapper {
    @Insert("insert into user values(null,#{username},#{password},#{nick})")
    void insert(User user);
    @Delete("delect from user where name=#{name}")
    void deleteByName(String name);
    @Update("update user set username=#{username},password=#{password},nick=#{nick} where id=#{id}")
    void updateByID(User user);
    @Select("select * from user")
    List<User> queryUser();
}
